﻿CREATE TABLE [RestartFramework].[ETLJobHistory]
(
	[ETLJobHistoryId]				INT					NOT NULL
,	[ETLJobId]						SMALLINT			NOT NULL
--,	[execution_id]					BIGINT NOT NULL
,	[ETLJobHistoryStartTime]		DATETIMEOFFSET(7)	NOT NULL
,	[ETLJobHistoryEndTime]			DATETIMEOFFSET(7)	NULL
,	[StartedByServerExecutionId]	BIGINT				NOT NULL
,	[EndedByServerExecutionId]		BIGINT				NULL
,	[RestartTally]					SMALLINT			NOT NULL
,	CONSTRAINT [PK_RestartFrameworkETLJobHistory] PRIMARY KEY ([ETLJobHistoryId]) 
,	CONSTRAINT [FK_RestartFrameworkETLJobHistory_REF_RestartFrameworkETLJob] FOREIGN KEY ([ETLJobId])REFERENCES[RestartFramework].[ETLJob]([ETLJobId])
)
